import { request } from "@/utils/request.js"

// get 接口实例1
export function queryNoticeCategoriesAll(params) {
	return request({
		url: '/notice/wx/categories/all',
		params
	})
}

export function searchNoticeAll(data) {
	return request({
		url: '/notice/wx/notices/search',
		data
	})
}

export function queryNoticeListByCategorieId(data) {
	return request({
		url: '/notice/wx/notices/categoryId',
		data
	})
}

// post 接口接口2
export function addNotice(data) {
	return request({
		url: '/notice/wx/notices',
		method: "post",
		data
	})
}




// 校园配送接口
export function queryOrderListAll(data) {
	return request({
		url: '/campus/bagTasks/list',
		data
	})
}
export function selectBagmanRegistrationByUserId(data) {
	return request({
		url: '/campus/bagRegistrations/wx/'+data,
	})
}
//接单
export function receivOrders(data){
	return request({
		url: '/campus/bagTasks/receivOrders',
		method: "post",
		data
	})
}

export function queryOrderListByUserId(data) {
	return request({
		url: '/campus/bagTasks/list/id',
		data
	})
}
//跑腿注册
export function bagRegistrations(data) {
	return request({
		url: '/campus/bagRegistrations',
		method: "post",
		data
	})
}
//发布跑腿
export function publishBagTasks(data) {
	return request({
		url: '/campus/bagTasks',
		method: "post",
		data
	})
}



export function getStatusDict() { 
  return {
    1: "待接单",
    2: "已接单",
    3: "进行中", 
    4: "已完成",
    5: "已取消",
    6: "已超时"
  }
}